Filename | (eval 1146)[/usr/lib/perl5/Template/Document.pm:78] |
Statements | Executed 5 statements in 5µs |
Eval Invoked At | /usr/lib/perl5/Template/Document.pm line 78 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8 |
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | sub { | ||||
2 | 1 | 600ns | my $context = shift || die "template sub called without context\n"; | ||
3 | 1 | 3µs | 1 | 3µs | my $stash = $context->stash; # spent 3µs making 1 call to Template::Context::stash |
4 | 1 | 400ns | my $output = ''; | ||
5 | 1 | 200ns | my $_tt_error; | ||
6 | |||||
7 | 1 | 1µs | eval { BLOCK: { | ||
8 | $output .= "<option value=\"relevance\">Relevance</option>\n<optgroup label=\"Popularity\">\n"; | ||||
9 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
10 | if (($stash->get('sort_by') eq 'popularity_dsc')) { | ||||
11 | $output .= " <option value=\"popularity_dsc\" selected=\"selected\">Popularity (most to least)</option>"; | ||||
12 | } | ||||
13 | else { | ||||
14 | $output .= " <option value=\"popularity_dsc\">Popularity (most to least)</option>\n"; | ||||
15 | } | ||||
16 | |||||
17 | $output .= " "; | ||||
18 | #line 5 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
19 | if (($stash->get('sort_by') eq 'popularity_asc')) { | ||||
20 | $output .= " <option value=\"popularity_asc\" selected=\"selected\">Popularity (least to most)</option>"; | ||||
21 | } | ||||
22 | else { | ||||
23 | $output .= " <option value=\"popularity_asc\">Popularity (least to most)</option>\n"; | ||||
24 | } | ||||
25 | |||||
26 | $output .= " </optgroup>\n<optgroup label=\"Author\">\n"; | ||||
27 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
28 | if (($stash->get('sort_by') eq 'author_az' || $stash->get('sort_by') eq 'author_asc')) { | ||||
29 | $output .= " <option value=\"author_az\" selected=\"selected\">Author (A-Z)</option>\n"; | ||||
30 | } | ||||
31 | else { | ||||
32 | $output .= " <option value=\"author_az\">Author (A-Z)</option>\n"; | ||||
33 | } | ||||
34 | |||||
35 | $output .= " "; | ||||
36 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
37 | if (($stash->get('sort_by') eq 'author_za' || $stash->get('sort_by') eq 'author_dsc')) { | ||||
38 | $output .= " <option value=\"author_za\" selected=\"selected\">Author (Z-A)</option>\n"; | ||||
39 | } | ||||
40 | else { | ||||
41 | $output .= " <option value=\"author_za\">Author (Z-A)</option>\n"; | ||||
42 | } | ||||
43 | |||||
44 | $output .= " </optgroup>\n<optgroup label=\"Call Number\">\n"; | ||||
45 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
46 | if (($stash->get('sort_by') eq 'call_number_asc')) { | ||||
47 | $output .= " <option value=\"call_number_asc\" selected=\"selected\">Call number (0-9 to A-Z)</option>\n"; | ||||
48 | } | ||||
49 | else { | ||||
50 | $output .= " <option value=\"call_number_asc\">Call number (0-9 to A-Z)</option>\n"; | ||||
51 | } | ||||
52 | |||||
53 | $output .= " "; | ||||
54 | #line 17 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
55 | if (($stash->get('sort_by') eq 'call_number_dsc')) { | ||||
56 | $output .= " <option value=\"call_number_dsc\" selected=\"selected\">Call number (Z-A to 9-0)</option>\n"; | ||||
57 | } | ||||
58 | else { | ||||
59 | $output .= " <option value=\"call_number_dsc\">Call number (Z-A to 9-0)</option>\n"; | ||||
60 | } | ||||
61 | |||||
62 | $output .= " </optgroup>\n<optgroup label=\"Dates\">\n"; | ||||
63 | #line 21 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
64 | if (($stash->get('sort_by') eq 'pubdate_dsc')) { | ||||
65 | $output .= " <option value=\"pubdate_dsc\" selected=\"selected\">Publication/Copyright date: Newest to oldest</option>\n"; | ||||
66 | } | ||||
67 | else { | ||||
68 | $output .= " <option value=\"pubdate_dsc\">Publication/Copyright date: Newest to oldest</option>\n"; | ||||
69 | } | ||||
70 | |||||
71 | $output .= " "; | ||||
72 | #line 23 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
73 | if (($stash->get('sort_by') eq 'pubdate_asc')) { | ||||
74 | $output .= " <option value=\"pubdate_asc\" selected=\"selected\">Publication/Copyright date: Oldest to newest</option>\n"; | ||||
75 | } | ||||
76 | else { | ||||
77 | $output .= " <option value=\"pubdate_asc\">Publication/Copyright date: Oldest to newest</option>\n"; | ||||
78 | } | ||||
79 | |||||
80 | $output .= " "; | ||||
81 | #line 25 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
82 | if (($stash->get('sort_by') eq 'acqdate_dsc')) { | ||||
83 | $output .= " <option value=\"acqdate_dsc\" selected=\"selected\">Acquisition date: Newest to oldest</option>\n"; | ||||
84 | } | ||||
85 | else { | ||||
86 | $output .= " <option value=\"acqdate_dsc\">Acquisition date: Newest to oldest</option>\n"; | ||||
87 | } | ||||
88 | |||||
89 | $output .= " "; | ||||
90 | #line 27 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
91 | if (($stash->get('sort_by') eq 'acqdate_asc')) { | ||||
92 | $output .= " <option value=\"acqdate_asc\" selected=\"selected\">Acquisition date: Oldest to newest</option>\n"; | ||||
93 | } | ||||
94 | else { | ||||
95 | $output .= " <option value=\"acqdate_asc\">Acquisition date: Oldest to newest</option>\n"; | ||||
96 | } | ||||
97 | |||||
98 | $output .= " </optgroup>\n<optgroup label=\"Title\">\n"; | ||||
99 | #line 31 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
100 | if (($stash->get('sort_by') eq 'title_az' || $stash->get('sort_by') eq 'title_asc')) { | ||||
101 | $output .= " <option value=\"title_az\" selected=\"selected\">Title (A-Z)</option>\n"; | ||||
102 | } | ||||
103 | else { | ||||
104 | $output .= " <option value=\"title_az\">Title (A-Z)</option>\n"; | ||||
105 | } | ||||
106 | |||||
107 | $output .= " "; | ||||
108 | #line 33 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/resort_form.inc" | ||||
109 | if (($stash->get('sort_by') eq 'title_za' || $stash->get('sort_by') eq 'title_dsc')) { | ||||
110 | $output .= " <option value=\"title_za\" selected=\"selected\">Title (Z-A)</option>\n"; | ||||
111 | } | ||||
112 | else { | ||||
113 | $output .= " <option value=\"title_za\">Title (Z-A)</option>\n"; | ||||
114 | } | ||||
115 | |||||
116 | $output .= " </optgroup>\n\n"; | ||||
117 | } }; | ||||
118 | if ($@) { | ||||
119 | $_tt_error = $context->catch($@, \$output); | ||||
120 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
121 | } | ||||
122 | |||||
123 | return $output; | ||||
124 | } | ||||
125 | |||||
126 | ; |